import { Component, OnInit } from '@angular/core';
var $=require('jquery')
var my=require('modules/my.js')
@Component({
  selector: 'app-carousel',
  templateUrl: './carousel.component.html',
  styleUrls: ['./carousel.component.less']
})

export class CarouselComponent implements OnInit {
	setData() {
	var options = {
		score: null,
		city: null,
		kelei: null
	};
	$('input.fll').change(function (e) {
		options.score = $(this).val();
		this.setSession('mybase', options);
	});
	$('.checkbox').find('select').on('change', function (e) {
		options.city = $(this).val();
		this.setSession('mybase', options);
	});
	$('.checkbox').find('input').click(function () {
		$.each($('.checkbox').find('input'), function (index, item) {
			if (item.checked) {
				if (index == 0) {
					options.kelei = "文科";
				} else {
					options.kelei = "理科";
				}
			}
			this.setSession('mybase', options);
		});
	});
};
setSession(key, obj) {
	sessionStorage.setItem(key, JSON.stringify(obj));
};

  constructor() {
  	
  }

  ngOnInit() {
  	my(1000,4000);
  }
}
